package com.wipz.eoa.iphone.dictionary.officedocument;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.wipz.eoa.iphone.BaseAction;

/**
 * 公文类型控制类
 * @author 张涛
 * @date 2012-3-6
 */

public class OfficeDocumentTypeAction extends BaseAction {
	
	private static final long serialVersionUID = 1L;
	private IOfficeDocumentTypeService officeDocumentTypeService;
	private Object view;
	private List list;

	public Object getView() {
		return view;
	}

	public void setView(Object view) {
		this.view = view;
	}

	
	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}


	public void setOfficeDocumentTypeService(
			IOfficeDocumentTypeService officeDocumentTypeService) {
		this.officeDocumentTypeService = officeDocumentTypeService;
	}

	/**
	 * 查询所有
	 * author：张涛
	 * date：2012-3-6
	 * time：下午06:08:44
	 * return：String
	 */
	public String list(){
		Map params = new HashMap();
		params.put("qtype", this.getRequest().getParameter("qtype"));
		params.put("qcode", this.getRequest().getParameter("qcode"));
		list = officeDocumentTypeService.queryAll(params);
		return SUCCESS;
	}
	
	/**
	 * 查看详细信息
	 * author：张涛
	 * date：2012-3-6
	 * time：下午06:08:51
	 * return：String
	 */
	@SuppressWarnings("unchecked")
	public String view(){
		Map params = new HashMap();
		params.put("ID", this.getRequest().getParameter("id"));
		view = officeDocumentTypeService.view(params);
		return SUCCESS;
		
	}
}
